/**
* @author   Frederic Saunier - www.tekool.net
* @since    2008/08/10
*
* Copyright (C) 2006 Frederic Saunier
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*
*/

package net.tekool.projects.objscomp.business;

import java.io.File;
import java.util.ArrayList;

/**
 * @author Administrateur
 *
 */
public class ClassDescriptor
{
	private File file;
	private String fileContent;
	private ArrayList<String> classPackage;
	private String className;
	
	/**
	* @param file
	* @param fileContent
	* @param classPackage
	* @param className
	*/
	public ClassDescriptor
	(
		File file,
		String fileContent,
		ArrayList<String> classPackage,
		String className
	)
    {
	    super();

	    this.file = file;
	    this.fileContent = fileContent;
	    this.classPackage = classPackage;
	    this.className = className;
    }
    
	/**
    * @return the file
    */
    public File getFile()
    {
    	return file;
    }

	/**
    * @return the fileContent
    */
    public String getFileContent()
    {
    	return fileContent;
    }

	/**
    * @return the classPackage
    */
    public ArrayList<String> getClassPackage()
    {
    	return classPackage;
    }

	/**
    * @return the className
    */
    public String getClassName()
    {
    	return className;
    }
    
	/**
     * @return the classPath
     */
    public String getClassPath()
    {
    	StringBuilder sb = new StringBuilder();
     	for(String s : classPackage) 
    	     sb.append(s).append(".");
    	
    	return sb.append(className).toString();
    }
    
	/**
     * @return the className
     */
    public String toString()
    {
    	return "object FileDescriptor" + "\n"
    		+ "{" + "\n"
	    	+ "\t" + "file : " + file + "\n"
	    	+ "\t" + "classPath : " + getClassPath() + "\n"
	    	+ "}"
    	;
    }
}